package com.lzh.others;

import java.io.Serializable;

/**
 * @Description: Serializable：序列化，通过Serializable接口将Java对象等内容转换成数据进行运输与保存。
 * transient：反序列化，由transient修饰的成员变量不会进行序列化保存。
 * @Author: LiuZiHao
 * @Date: 2022/7/22 10:00
 */
public class User implements Serializable {
    /**
     * 序列版本号
     */
    private static final long serialVersionUID = 1L;
    private String loginName;
    private transient String passWord;// 反序列化
    private String userName;

    private int orderNo;

    public User() {

    }

    public User(String loginName, String passWord, String userName) {
        this.loginName = loginName;
        this.passWord = passWord;
        this.userName = userName;
    }

    public User(String loginName, String passWord, String userName, int orderNo) {
        this.loginName = loginName;
        this.passWord = passWord;
        this.userName = userName;
        this.orderNo = orderNo;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getPassWord() {
        return passWord;
    }

    public void setPassWord(String passWord) {
        this.passWord = passWord;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public int getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(int orderNo) {
        this.orderNo = orderNo;
    }

    @Override
    public String toString() {
        return "User{" +
                "loginName='" + loginName + '\'' +
                ", passWord='" + passWord + '\'' +
                ", userName='" + userName + '\'' +
                ", orderNo=" + orderNo +
                '}';
    }
}
